import React from "react";
import styles from './index.module.less'
import {WidgetListProps} from '@/config'

const Widget = (props:WidgetListProps) => {

    const {title, total, unit, increased, increasedTitle,increasedUnit,icon,gif} = props
    return (

        <div className={styles.widget}>
            <div className={styles.gifs}>
                <img src={gif} alt="" />
            </div>
            <div className={styles.infos}>
                <div className={styles.title}>
                    {title}
                </div>
                <div className={styles.total}>
                    <span>{total}</span><span style={{fontSize:14}}>{unit}</span>
                </div>
                <div className={styles.increased}>
                    {
                        increasedTitle && <span>{increasedTitle}：{increased}{increasedUnit}</span>
                    }
                </div>
            </div>
        </div>
    )
}

export default Widget